package cn.edu.ren.controller;

import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @PackageName: cn.edu.ren.controller
 * @ClassName: GatewayController
 * @Description:
 * @author: RZS
 * @date: 2021/7/6  16:23
 */
@RestController
@RequestMapping("/gateway")
public class GatewayController {

    @GetMapping("/hello")
    public String hello(ServerHttpRequest request) throws Exception {
        System.err.println(request.getHeaders());
        System.err.println(request.getHeaders().get("X-Request-Foo"));
        return "success";
    }
}
